package entity

type ExperimentOption func(*Experiment)

func NewExperimentEntity(opts ...ExperimentOption) ExperimentEntity {
	experiment := &Experiment{}
	experiment.UpdateEntity(opts...)
	return experiment
}

func (e *Experiment) UpdateEntity(opts ...ExperimentOption) {
	for _, opt := range opts {
		opt(e)
	}
}

func WithExpID(id uint) ExperimentOption {
	return func(e *Experiment) {
		e.ID = id
	}
}

func WithExpName(name string) ExperimentOption {
	return func(e *Experiment) {
		e.Name = name
	}
}

func WithExpDescription(description string) ExperimentOption {
	return func(e *Experiment) {
		e.Description = description
	}
}

func WithExpQueue(queue string) ExperimentOption {
	return func(e *Experiment) {
		e.Queue = queue
	}
}
